package com.gk.carshopsys.controller;

import com.gk.carshopsys.pojo.SysLog;
import com.gk.carshopsys.service.LogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
public class LogController {
    @Autowired
    LogService logService;

    @RequestMapping("/loglist")
    public String tolog(){
        return "loglist";
    }

    @RequestMapping("/loglist/query")
    @ResponseBody
    public List<SysLog> querylog(){
        return logService.findLog();
    }
}
